package cn.gzjp.modules.logis.entity;

import cn.gzjp.common.config.ConfigUtils;
import cn.gzjp.common.utils.StringUtils;
import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

/**
 * 司机车辆Entity
 * @author zengcp
 * @version 2018-04-03
 */
public class LogisCar extends DataEntity<LogisCar> {


	private static final long serialVersionUID = 1L;
	private String licensePlate;        // 车牌

	private String trailerLicensePlate;//挂车车牌

	private String models; //车型
	private String owner;//所有人
	private String address;//住址
	private String brand;//品牌型号
	private String vin;//车辆识别代号VIN
	private String registDate;//注册日期
	private String issuingDate;//发证日期


	private String masterDriver;//主驾驶
	private String viceDriver;//副驾驶
	private String carHeadImg;//车头照片
	private String carLength;//车长
	private String loadweight;//核载重量

	private String jszImg1;        // 驾驶证正本
	private String jszImg2;        // 驾驶证副本
	private String xszImg1;        // 行驶证正本
	private String xszImg2;        // 行驶证副本
	private Integer carStatus;        // 车辆审核状态0审核中 1已认证 2请重新上传
	private Integer driverStatus;        //司机审核状态0审核中 1已认证 2请重新上传
	private Integer realNameStatus;//实名审核状态0审核中 1已认证 2请重新上传

	private String carRefusalReason;//车辆审核拒绝原因
	private String driverRefusalReason;//司机审核拒绝原因
	private String realNameRefusalReason;//实名审核拒绝原因

	private String idcardImg1; //身份证正面
	private String idcardImg2; //身份证反面

	private String driverType;//司机类型 1主驾驶 2副驾驶


	private String headImg;        // 头像
	private String nickName;        // 昵称
	private String realName;  //姓名
	private String mobile;        // 手机号
	private String gender;//性别

	private String birthDay;//出生日期
	private String zjcx;//准驾车型
	private String cclzrq;//初次领证日期
	private String yxqqssj;//有效期起始时间
	private String yxqzssj;//有效期终止时间

	private String idCardNum;//身份证号
	private String useProperty;//使用性质
	private String masterDriverName;//主驾驶姓名


	private String gcXszImg1;        // 挂车行驶证正本
	private String gcXszImg2;        // 挂车行驶证副本

	private int roadCount;//报价线路

	private String auditor;

	public LogisCar() {
		super();
	}

	public LogisCar(String id) {
		super(id);
	}

	@Length(min = 0, max = 32, message = "车牌长度必须介于 0 和 32 之间")
	@ExcelField(title = "车牌", align = 2, sort = 1)
	public String getLicensePlate() {
		return licensePlate;
	}

	public void setLicensePlate(String licensePlate) {
		this.licensePlate = licensePlate;
	}

	@Length(min = 0, max = 256, message = "驾驶证正本长度必须介于 0 和 256 之间")
	@ExcelField(title = "驾驶证正本", align = 2, sort = 2)
	public String getJszImg1() {
		return jszImg1;
	}

	public void setJszImg1(String jszImg1) {
		this.jszImg1 = jszImg1;
	}

	@Length(min = 0, max = 256, message = "驾驶证副本长度必须介于 0 和 256 之间")
	@ExcelField(title = "驾驶证副本", align = 2, sort = 3)
	public String getJszImg2() {
		return jszImg2;
	}

	public void setJszImg2(String jszImg2) {
		this.jszImg2 = jszImg2;
	}

	@Length(min = 0, max = 256, message = "行驶证正本长度必须介于 0 和 256 之间")
	@ExcelField(title = "行驶证正本", align = 2, sort = 4)
	public String getXszImg1() {
		return xszImg1;
	}

	public void setXszImg1(String xszImg1) {
		this.xszImg1 = xszImg1;
	}

	@Length(min = 0, max = 256, message = "行驶证副本长度必须介于 0 和 256 之间")
	@ExcelField(title = "行驶证副本", align = 2, sort = 5)
	public String getXszImg2() {
		return xszImg2;
	}

	public void setXszImg2(String xszImg2) {
		this.xszImg2 = xszImg2;
	}


	public Integer getCarStatus() {
		return carStatus;
	}

	public void setCarStatus(Integer carStatus) {
		this.carStatus = carStatus;
	}

	public Integer getDriverStatus() {
		return driverStatus;
	}

	public void setDriverStatus(Integer driverStatus) {
		this.driverStatus = driverStatus;
	}

	public String getJszImg1Url() {
		if (StringUtils.isNotBlank(jszImg1)) {
			if (jszImg1.startsWith("http")) {
				return jszImg1;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + jszImg1;
			}
		}
		return "";
	}

	public String getJszImg2Url() {
		if (StringUtils.isNotBlank(jszImg2)) {
			if (jszImg2.startsWith("http")) {
				return jszImg2;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + jszImg2;
			}
		}
		return "";
	}

	public String getXszImg2Url() {
		if (StringUtils.isNotBlank(xszImg2)) {
			if (xszImg2.startsWith("http")) {
				return xszImg2;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + xszImg2;
			}
		}
		return "";
	}

	public String getXszImg1Url() {
		if (StringUtils.isNotBlank(xszImg1)) {
			if (xszImg1.startsWith("http")) {
				return xszImg1;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + xszImg1;
			}
		}
		return "";
	}

	public String getIdcard1ImgUrl() {
		if (StringUtils.isNotBlank(idcardImg1)) {
			if (idcardImg1.startsWith("http")) {
				return idcardImg1;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + idcardImg1;
			}
		}
		return "";
	}

	public String getIdcard2ImgUrl() {
		if (StringUtils.isNotBlank(idcardImg2)) {
			if (idcardImg2.startsWith("http")) {
				return idcardImg2;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + idcardImg2;
			}
		}
		return "";
	}

	public String getIdcardImg1() {
		return idcardImg1;
	}

	public void setIdcardImg1(String idcardImg1) {
		this.idcardImg1 = idcardImg1;
	}

	public String getIdcardImg2() {
		return idcardImg2;
	}

	public void setIdcardImg2(String idcardImg2) {
		this.idcardImg2 = idcardImg2;
	}

	public String getCarHeadImg() {
		return carHeadImg;
	}

	public String getCarHeadImgImgUrl() {
		if (StringUtils.isNotBlank(carHeadImg)) {
			if (carHeadImg.startsWith("http")) {
				return carHeadImg;
			} else {
				String photoUrl = ConfigUtils.getProperty("photoUrl");
				return photoUrl + carHeadImg;
			}
		}
		return "";
	}

	public void setCarHeadImg(String carHeadImg) {
		this.carHeadImg = carHeadImg;
	}

	public String getMasterDriver() {
		return masterDriver;
	}

	public void setMasterDriver(String masterDriver) {
		this.masterDriver = masterDriver;
	}

	public String getViceDriver() {
		return viceDriver;
	}

	public void setViceDriver(String viceDriver) {
		this.viceDriver = viceDriver;
	}

	public String getDriverType() {
		return driverType;
	}

	public void setDriverType(String driverType) {
		this.driverType = driverType;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getModels() {
		return models;
	}

	public void setModels(String models) {
		this.models = models;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getVin() {
		return vin;
	}

	public void setVin(String vin) {
		this.vin = vin;
	}

	public String getRegistDate() {
		return registDate;
	}

	public void setRegistDate(String registDate) {
		this.registDate = registDate;
	}

	public String getIssuingDate() {
		return issuingDate;
	}

	public void setIssuingDate(String issuingDate) {
		this.issuingDate = issuingDate;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(String birthDay) {
		this.birthDay = birthDay;
	}

	public String getZjcx() {
		return zjcx;
	}

	public void setZjcx(String zjcx) {
		this.zjcx = zjcx;
	}

	public String getCclzrq() {
		return cclzrq;
	}

	public void setCclzrq(String cclzrq) {
		this.cclzrq = cclzrq;
	}

	public String getYxqqssj() {
		return yxqqssj;
	}

	public void setYxqqssj(String yxqqssj) {
		this.yxqqssj = yxqqssj;
	}

	public String getYxqzssj() {
		return yxqzssj;
	}

	public void setYxqzssj(String yxqzssj) {
		this.yxqzssj = yxqzssj;
	}


	public String getCarRefusalReason() {
		return carRefusalReason;
	}

	public void setCarRefusalReason(String carRefusalReason) {
		this.carRefusalReason = carRefusalReason;
	}

	public String getDriverRefusalReason() {
		return driverRefusalReason;
	}

	public void setDriverRefusalReason(String driverRefusalReason) {
		this.driverRefusalReason = driverRefusalReason;
	}

	public String getCarLength() {
		return carLength;
	}

	public void setCarLength(String carLength) {
		this.carLength = carLength;
	}

	public String getLoadweight() {
		return loadweight;
	}

	public void setLoadweight(String loadweight) {
		this.loadweight = loadweight;
	}

	public String getTrailerLicensePlate() {
		return trailerLicensePlate;
	}

	public void setTrailerLicensePlate(String trailerLicensePlate) {
		this.trailerLicensePlate = trailerLicensePlate;
	}

	public String getIdCardNum() {
		return idCardNum;
	}

	public void setIdCardNum(String idCardNum) {
		this.idCardNum = idCardNum;
	}

	public String getUseProperty() {
		return useProperty;
	}

	public void setUseProperty(String useProperty) {
		this.useProperty = useProperty;
	}

	public String getMasterDriverName() {
		return masterDriverName;
	}

	public void setMasterDriverName(String masterDriverName) {
		this.masterDriverName = masterDriverName;
	}

	public String getGcXszImg1() {
		return gcXszImg1;
	}

	public void setGcXszImg1(String gcXszImg1) {
		this.gcXszImg1 = gcXszImg1;
	}

	public String getGcXszImg2() {
		return gcXszImg2;
	}

	public void setGcXszImg2(String gcXszImg2) {
		this.gcXszImg2 = gcXszImg2;
	}

	public int getRoadCount() {
		return roadCount;
	}

	public void setRoadCount(int roadCount) {
		this.roadCount = roadCount;
	}

	public Integer getRealNameStatus() {
		return realNameStatus;
	}

	public void setRealNameStatus(Integer realNameStatus) {
		this.realNameStatus = realNameStatus;
	}

	public String getRealNameRefusalReason() {
		return realNameRefusalReason;
	}

	public void setRealNameRefusalReason(String realNameRefusalReason) {
		this.realNameRefusalReason = realNameRefusalReason;
	}

	public String getAuditor() {
		return auditor;
	}

	public void setAuditor(String auditor) {
		this.auditor = auditor;
	}
}